const Router = require('koa-router');
let router = new Router();


router.get('', async ctx => {
  let { HTTP_ROOT } = ctx.config;
  let banners = await ctx.db.query('SELECT * FROM banner_table ORDER BY serial ASC');
  await ctx.render('www/index', {
    banners,
    HTTP_ROOT
  })
})

module.exports = router.routes()